package com.osig.ec.cfca;

import cfca.paperless.client.servlet.PaperlessClient;
import cfca.paperless.client.util.StringUtil;

/**
 * @Description
 * @Author dell
 * @Date 2016-5-13
 * @CodeReviewer TODO 查询签约方 根据 签约方编号
 */
public class testGetSealInfo {

	public static void main(String[] args) throws Exception {
		try {
			PaperlessClient clientBean = new PaperlessClient(PaperlessConfig.assistUrl);// 无纸化辅助接口的访问URL

			// 操作员编码或者机构号
			String operatorCode = PaperlessConfig.operatorCode;

			String sealCode = "1111";
			String result = clientBean.getSealInfo(sealCode, operatorCode);

			String code = StringUtil.getNodeText(result, "Code");
			if (!code.equals("200")) {
				System.out.println("OK:getSealInfo");
				System.out.println(result);
			} else {
				System.out.println(result);
				System.out.println("SealCode:" + StringUtil.getNodeText(result, "SealCode"));
				System.out.println("SealName:" + StringUtil.getNodeText(result, "SealName"));// 签约方名称
				System.out.println("SealPassword:" + StringUtil.getNodeText(result, "SealPassword"));
				System.out.println("TellerCode:" + StringUtil.getNodeText(result, "TellerCode"));
				System.out.println("OrgCode:" + StringUtil.getNodeText(result, "OrgCode"));
				System.out.println("OrgName:" + StringUtil.getNodeText(result, "OrgName"));
				System.out.println("SealCert:" + StringUtil.getNodeText(result, "SealCert"));
			}

			Thread.sleep(10000);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
